package com.xiaoran.springmq.counser;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import javax.jms.ConnectionFactory;

@SpringBootApplication
public class MainApp_TopicCounser {
    public static  void main(String args[]){
        SpringApplication.run(MainApp_TopicCounser.class,args);
    }
    @Bean
    public ConnectionFactory connectionFactory() {
        System.out.println("aaaaaaaaaaaaaaaaaaaaaa");
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
        connectionFactory.setBrokerURL("tcp://192.168.171.128:61616");
        connectionFactory.setUserName("admin");
        connectionFactory.setPassword("admin");
        return connectionFactory;
    }
}
